/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface ShopOtherSet extends BasicModel<ShopOtherSet> {
  stype?: string; // 类型
  picUrl?: string; // 图片地址
}

export const shopOtherSetList = (params?: ShopOtherSet | any) =>
  defHttp.get<ShopOtherSet>({ url: adminPath + '/shop/other/set/list', params });

export const shopOtherSetListData = (params?: ShopOtherSet | any) =>
  defHttp.post<Page<ShopOtherSet>>({ url: adminPath + '/shop/other/set/listData', params });

export const shopOtherSetForm = (params?: ShopOtherSet | any) =>
  defHttp.get<ShopOtherSet>({ url: adminPath + '/shop/other/set/form', params });

export const shopOtherSetSave = (params?: any, data?: ShopOtherSet | any) =>
  defHttp.postJson<ShopOtherSet>({ url: adminPath + '/shop/other/set/save', params, data });

export const shopOtherSetDelete = (params?: ShopOtherSet | any) =>
  defHttp.get<ShopOtherSet>({ url: adminPath + '/shop/other/set/delete', params });

export const savePic = (params?: any, data?: ShopOtherSet | any) =>
  defHttp.postJson<ShopOtherSet>({ url: adminPath + '/shop/other/set/savePic', params, data });
